//
//  ZStackPageView.swift
//  SwiftUIDemo
//
//  Created by zhouzuosong on 2020/8/16.
//  Copyright © 2020 Kael. All rights reserved.
//

import SwiftUI

struct ZStackPageView: View {
    var body: some View {
        ZStack{
            Color.gray
                .edgesIgnoringSafeArea(.all)
            
            VStack(spacing: 20) {
                Text("ZStack").font(.largeTitle)
                Text("ZStack").foregroundColor(.white)
                Text("忽略安全区的显示UI约束问题")
          //          .frame(maxWidth: .infinity, maxHeight: .infinity)
                    .padding()
                    .foregroundColor(.white)
                    .background(Color.green)
                
                ZStack(alignment: .bottomTrailing){
                    Color.orange
                    Image("boy")
                    Rectangle()
                        .foregroundColor(Color.white)
                        .frame(width: 390, height: 50)
                    Text("ZStack Text 文本")
                        .font(.title)
                        .padding()
                }

            }
            
            
        }
        //.edgesIgnoringSafeArea(.all)
    }
}

struct ZStackPageView_Previews: PreviewProvider {
    static var previews: some View {
        ZStackPageView()
    }
}
